<?php

class Menus extends CWidget {
    public $type = 'top';
    const tbl_menu = 'menu';
    const tbl_menu_item = 'menu_item';
    public $flag = false;
    public function run() {
        $this->type = 'top';
        $this->render('_menu_'.$this->type,array('menu_items'=>$this->get_top(),'flag'=>$this->flag));
    }
    
    protected function get_top(){
       $datas = Lvc::getCacheData('menu_item', '_front_menu_'.$this->type, 'parent_id,name,link', 'menu_id='.Common::menu_0.' AND status='.Lvc::BLOGSPOT_ENABLED, 'id asc');
       $this->flag = true;
    }
    
}

?>
